<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>测试Rest风格：</h1>
<!--默认只有get  和  post  要在application.yml 开启 并且用这种特殊方式-->
<form action="/user/1" method="get">
    <input value="REST-GET th提交" type="submit"/>
</form>
<form action="/user" method="POST">
    用户名: <input name= "userName" value="888"/> <br>
    邮箱: <input name="email" value="888@qq.com"/>
    <hr/>
    <input value="REST-POST th提交" type="submit"/>
</form>
<!--使用客户端工具， 如PostMan直接发送Put、delete等方式请求，无需Filter
    看底层  当为POST的时候才会进入 -->
<form action="/user" method="POST">
    <input name="_method" type="hidden" value="delete">
    <input value="REST-DELETE th提交" type="submit"/>
</form>
<form action="/user" method="post">
    <input name="_method" type="hidden" value="put">
    <input value="REST-PUT th提交" type="submit"/>
</form>
<hr/>
</body>
</html>